package com.ml.mall.service.company.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ml.mall.entity.company.SysCompanyBusinessBackground;
import com.ml.mall.mapper.company.SysCompanyBusinessBackgroundMapper;
import com.ml.mall.service.company.SysCompanyBusinessBackgroundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

@Service
public class SysCompanyBusinessBackgroundServiceImpl extends ServiceImpl<SysCompanyBusinessBackgroundMapper, SysCompanyBusinessBackground> implements SysCompanyBusinessBackgroundService {
    @Autowired
    private SysCompanyBusinessBackgroundMapper sysCompanyBusinessBackgroundMapper;

    @Override
    public void saveCompanyBusinessBackground(String businessBackground, Long companyId) {
        if(!StringUtils.isEmpty(businessBackground)){
            SysCompanyBusinessBackground sysCompanyBusinessBackground = new SysCompanyBusinessBackground();
            sysCompanyBusinessBackground.setCompanyId(companyId);
            sysCompanyBusinessBackground.setDescription(businessBackground);
            sysCompanyBusinessBackgroundMapper.insert(sysCompanyBusinessBackground);
        }
    }
}
